1. Technical Field
The technology presented herein relates to a storage medium having stored thereon an information processing program and an information processing apparatus, and more particularly to a storage medium having stored thereon an information processing program and an information processing apparatus which process acceleration data outputted from an acceleration detection section which detects, for example, acceleration along at least two axis directions applied to an input device.
2. Description of the Background Art
As disclosed in Japanese Laid-Open Patent Publication No. 2000-308756 (hereinafter referred to as Patent Document 1), for example, conventionally known is an input control device for a game apparatus which includes an input device provided with an acceleration sensor, so as to detect a moving direction of the input device of a stick shape. In the above game apparatus, a direction in which the input device held by a user is swung is identified, and a game process is performed based on the direction. For example, it may be considered that, by using translational acceleration which is obtained by subtracting a gravitational acceleration component from acceleration applied to the input device while the input device is being swung, the direction in which the input device is swung is identified.
Here, in order to obtain the translational acceleration of the input device, the gravitational acceleration applied to the input device needs to be extracted. However, since acceleration applied to the input device represents a combined value between the translational acceleration and the gravitational acceleration, it is difficult to accurately calculate the gravitational acceleration component only, and thus such calculation is based on estimation to some degree. Accordingly, it is also difficult to accurately obtain the translational acceleration by subtracting the gravitational acceleration, which is obtained based on the estimation, from the acceleration applied to the input device, and as a result, the direction in which the input device is swung cannot be identified accurately.